<% content_for :css do %>
  <%= stylesheet_link_tag 'applications_new_or_edit','projects_new_or_edit' %>
<% end %>
<% content_for :title do %>修改『<%= @project.name %>』的基本资料<% end %>
<%= form_for @project,
      :html => {
        :id => :project_form,
        :class => 'model_form'
      } do |f| %>
<div class="grid_12 model project">
  <div class="grid_12 head alpha omega">
    <div class="grid_12 title">
      修改『<%= @project.name %>』的基本资料
    </div>  
    <% if flash[:success].present? %>
    <div id='success' class="grid_8">
      <div><%= flash[:success] %></div>
    </div>         
    <% end %>
    <div class="grid_12 line">
      <div class="grid_2">名称</div>
      <div class="grid_9">
        <%= f.text_field :name %>
      </div>
    </div>
    <div class="grid_12 line">
      <div class="grid_2">地址</div>
      <div class="grid_9">
        <%= f.text_field :address %>
      </div>
    </div> 
    <div class="grid_12 line">
      <div class="grid_2">开发商</div>
      <div class="grid_9">
        <%= f.collection_select :enterprise_id, Enterprise.all,:id, :name %>
      </div>
    </div> 
  </div>
  <div class="grid_12 alpha body"> 
    <div class="grid_12 line">
      <div class="grid_2">简介</div>
      <div class="grid_9">
        <%= f.label :synopsis, '添加简介描述', :id => :label_for_project_synopsis, :class => @project.remark.blank? ? '' : :hidden %>
        <%= f.text_area :synopsis %>
        <%= label_js_for :project_synopsis %>
      </div>
    </div>  
    <div class="grid_12 line">
      <div class="grid_2">备注</div>
      <div class="grid_9">
        <%= f.label :remark, '添加备注描述', :id => :label_for_project_remark, :class => @project.remark.blank? ? '' : :hidden %>
        <%= f.text_area :remark %>
        <%= label_js_for :project_remark %>
      </div>
    </div> 
  </div>  
  <div class="grid_12 bottom">
    <div class="grid_10">
      <%= f.submit "更新该项目的基本资料" %><small>或</small><%= link_to "返回", projects_url   %>
    </div>
  </div>  
</div>
<% end %>